package model01;

import java.util.Scanner;

import sun.dyn.empty.Empty;

public class Student {
	private int maSo;
	private String hoTen;
	private float diemTrungBinh;
	
	public Student() {
		setMaSo(maSo);
		setHoTen(hoTen);
		setDiemTrungBinh(diemTrungBinh);
	}
	
	//nhap thong tin
	public void nhapThongTin() {
		Scanner s = new Scanner(System.in);
		
		System.out.print("Ho ten: ");
		do {
			hoTen = s.nextLine();
		} while(hoTen.length() == 0 || hoTen.trim().isEmpty());
		
		System.out.print("Ma so: ");
		do {
			maSo = s.nextInt();
		} while(maSo <= 0);
	
		System.out.print("Diem trung binh: ");
		do {
			diemTrungBinh = s.nextFloat();
		} while(diemTrungBinh < 0 || diemTrungBinh > 10);
		
		System.out.println();
	}
	
	private boolean Empty(String hoTen2) {
		// TODO Auto-generated method stub
		return false;
	}

	//xuat ra thong tin vua nhap vao
	public void xuatThongTin() {
		System.out.println("Sinh vien: " + hoTen);
		System.out.println("Ma so: " + maSo);
		System.out.println("Diem trung binh: " + diemTrungBinh);
	}
	
	public int getMaSo() {
		return maSo;
	}
	public void setMaSo(int maSo) {
		this.maSo = maSo;
	}
	public String getHoTen() {
		return hoTen;
	}
	public void setHoTen(String hoTen) {
		this.hoTen = hoTen;
	}
	public float getDiemTrungBinh() {
		return diemTrungBinh;
	}
	public void setDiemTrungBinh(float diemTrungBinh) {
		this.diemTrungBinh = diemTrungBinh;
	}
	
	

}
